package com.example.springevent.demos;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationListener;

public class DemoEventListener implements ApplicationListener<DemoEvent> {

	private static final Logger log = LoggerFactory.getLogger(DemoEventListener.class);

	@Override
	public void onApplicationEvent(DemoEvent event) {
		log.info("开始事件监听DemoEventListener.onApplicationEvent, Thread = [{}], 事件内容[{}]", Thread.currentThread().getName(), event.toString());
	}

}
